window.onload=function (){
      getAllMv();
}

getnav();
/**
 *
 */
function getnav(){
    const oSingerChoiceLi=document.querySelectorAll('#choice-ul .singer-choice-li');
    oSingerChoiceLi.forEach(function (item,index){
        item.onclick=function (){
            for(let i=0;i<oSingerChoiceLi.length;i++){
                oSingerChoiceLi[i].classList.remove('active');
            }
            item.classList.add('active');

        }
    })
}



function  getAllMv(){
    $ajax({
        url:all_mv,
        method:"get",
        success:function (e){
            console.log(e)
            if(e.code===200){
                const oMvSublist=document.querySelector('.mv-sublist');



                let result=e.data;
                console.log(result);
                let str='';
                 result.forEach(function (item,index){
                           str+=` <li class="start-sublist-items">
                        <div class="start-pic">
                            <a href="" class="start-link">
                                <img src="${item.cover}" alt="" class="start-link-img">
                                <i class="icon-bg"></i>
                            </a>
                        </div>
                        <div class="start-content">
                            <h3 class="start-con-title">
                                <a href="" class="start-con-link">${item.name}</a>
                            </h3>
                            <p class="start-con-info"><a href="" class="start-con-author">Stephen Hill /Lillie Knauls
                                    /Gaither</a></p>
                            <div class="start-con-foot">
                                <span class="start-con-text">
                                    <i class="iconfont icon-zhibofuwu"></i>39
                                    <em> 2022-06-20</em>
                                </span>
                            </div>
                        </div>
                    </li>`
                 })
                oMvSublist.innerHTML=str;

            }
        }
    })
}